package com.sf.fy.uav.common.response.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 用户详情响应
 *
 * @author LTQ
 */
@Data
@JsonIgnoreProperties(value = "handler")
public class SysPricingResponse implements Serializable {

    private static final long serialVersionUID = -5191384098552049793L;

    private String id;

    private String takeoffCode;

    private String landingCode;

    private String takeoffName;

    private String landingName;

    private Integer startHour;

    private String processedBy;

    private Integer endHour;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private BigDecimal price;

    private Date updateTime;

    private Date createTime;

    private Boolean enable;

    private String pricingWeightRule;

    private String pricingDistanceRule;

    private Byte productType;

    //特殊定价集合
    private List<SpecialPricingResp> specialPricingResps;
    //特殊定价字符串
    private String specialPricingText;
    //产品类型名称
    private String productTypeName;

    /**
     * 基础重量或基础距离增加附属条件
     */
    private List<PricingRuleRange> pricingRuleRangeArray;
    @Data
    public static class PricingRuleRange{
        /**
         *定价规则表主键id
         */
        private String pricingRuleId;
        /**
         * 重量还是距离定价类型
         */
        private Byte type;
        /**
         * 基础重量or基础距离
         */
        private BigDecimal baseNum;

        private List<WeightOrDistance> weightOrDistanceList;
        @Data
        public static class WeightOrDistance{
            /**
             * 定价规则范围明细主键id
             */
            private String pricingRuleRangeId;

            private Byte rangeTypes;
            /**
             * 起始重量or起始距离
             */
            private BigDecimal startNum;
            /**
             * 最大重量or最大距离
             */
            private BigDecimal endNum;
            /**
             * 加价金额
             */
            private BigDecimal markupPrice;
            /**
             * 排序字段
             */
            private Integer sort;
        }
    }

}
